package com.symone.webcms.service;

import com.symone.webcms.model.DataContent;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.symone.webcms.model.vo.DataContentVO;

import javax.servlet.http.HttpServletRequest;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
 *   @description : Content 服务接口
 *   ---------------------------------
 * 	 @author Archer Chu
 *   @since 2019-03-24
 */
public interface DataContentService extends IService<DataContent> {

    boolean insert(DataContent content);

    Page<DataContent> findPage(Page<DataContent> page, Wrapper<DataContent> content);

    List<DataContent> findAll();

    boolean delete(long id);

    boolean deleteFlagById(long id);

    int clear();

    boolean add(HttpServletRequest request, @NotNull(message = "用户名不能为空") String userName);

    boolean update(HttpServletRequest request, @NotNull(message = "用户名不能为空") String userName);

    Page<DataContentVO> selectConditionPage(Page<DataContentVO> page, String lang, String module,Long groupId, String key, String val);

}
